<%--
  Created by IntelliJ IDEA.
  User: qintao30057
  Date: 2018/1/26
  Time: 9:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>编辑服务商</title>
    <%@ include file="../../common/meta.jsp" %>
    <%@ include file="../../common/common-body.jsp" %>
    <link href="${ctx}/css/page/common-win.css?t=${now}" rel="stylesheet">
    <script src="${ctx}/js/common/myDateTimeFormat.js?t=${now}"></script>
    <script src="${ctx}/js/common/upLoadingFileSize.js?t=${now}"></script>
    <script src="${ctx}/js/plugins/jquery.ajaxfileupload-2.1.js?t=${now}"></script>
    <script src="${ctx}/js/imageview/jquery.photo.gallery.js?t=${now}"></script>
    <style>
        #_btnDiv{
            height: 34px;
            margin-bottom: 0px;
        }
    </style>
    <script>
        var editType = '${type}';
        var oneIsvInfo = ${oneIsvInfo};
        var searchIsvInfo = ${searchIsvInfo};
        var imgSrcDefault = "${ctx}/images/main/default.jpg";
    </script>
</head>
<body class="gray-bg">
<div>
    <div class="myContent">
        <div class="tabs-container">
            <div class="tab-content">
                <%--项目简介--%>
                <div id="tab-1" class="tab-pane active">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="ibox float-e-margins myIbox">
                                <div class="ibox-content">
                                    <h5 class="page-header page-header-new"><i class="fa fa-file-text"></i>&nbsp;&nbsp;基本信息</h5>
                                    <form class="form-horizontal m-t" id="_isvDataForm">
                                        <c:choose>
                                            <c:when test="${type=='info'}">
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">服务商PID：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty oneIsvInfo ? oneIsvInfo.isvPid : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">服务商名称：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty oneIsvInfo ? oneIsvInfo.isvName : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">公司名称：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty oneIsvInfo ? oneIsvInfo.companyName : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">公司地址：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty oneIsvInfo ? oneIsvInfo.companyAddr : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">联系人：</label>
                                                    <label class="col-sm-3 control-label control-label-content">${not empty oneIsvInfo ? oneIsvInfo.contactPerson : ''}</label>
                                                    <label class="col-sm-2 control-label">联系电话：</label>
                                                    <label class="col-sm-3 control-label control-label-content">${not empty oneIsvInfo ? oneIsvInfo.contactPhone : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">对接人（BD）：</label>
                                                    <label class="col-sm-3 control-label control-label-content">${not empty oneIsvInfo ? oneIsvInfo.bdContact : ''}</label>
                                                    <label class="col-sm-2 control-label">编码：</label>
                                                    <label class="col-sm-3 control-label control-label-content">${not empty oneIsvInfo ? oneIsvInfo.code : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">服务商logo：</label>
                                                    <div class="col-sm-8">
                                                        <div  class="col-sm-2">
                                                            <div class="gallerys">
                                                                <img style="float: left"
                                                                     class="img-rounded img-header gallery-pic"
                                                                     onclick='$.openPhotoGallery(this)'
                                                                     src="${not empty oneIsvInfo.isvIcon && not empty oneIsvInfo.isvIcon?oneIsvInfo.isvIcon:ctx}${not empty oneIsvInfo&&not empty oneIsvInfo.isvIcon ?'':'/images/main/default.jpg'}">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </c:when>
                                            <c:otherwise>
                                                <c:if test="${type != 'add'}">
                                                    <div class="form-group">
                                                        <label class="col-sm-2 control-label">服务商PID：</label>
                                                        <label class="col-sm-8 control-label control-label-content">${not empty oneIsvInfo ? oneIsvInfo.isvPid : ''}</label>
                                                    </div>
                                                </c:if>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label"><span style="color: red">*</span>服务商名称：</label>
                                                    <div class="col-sm-8">
                                                        <input type="text" id="isvName" name="isvName" class="form-control" maxlength="20" required value="${not empty oneIsvInfo ? oneIsvInfo.isvName : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label"><span style="color: red">*</span>公司名称：</label>
                                                    <div class="col-sm-8">
                                                        <input type="text" id="companyName" name="companyName" class="form-control" maxlength="50" required value="${not empty oneIsvInfo ? oneIsvInfo.companyName : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label">公司地址：</label>
                                                    <div class="col-sm-8">
                                                        <input type="text" id="companyAddr" name="companyAddr" class="form-control" maxlength="500" value="${not empty oneIsvInfo ? oneIsvInfo.companyAddr : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label"><span style="color: red">*</span>联系人：</label>
                                                    <div class="col-sm-3">
                                                        <input type="text" id="contactPerson" name="contactPerson" class="form-control" maxlength="20" required value="${not empty oneIsvInfo ? oneIsvInfo.contactPerson : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                    <label class="col-sm-2 control-label"><span style="color: red">*</span>联系电话：</label>
                                                    <div class="col-sm-3">
                                                        <input type="text" id="contactPhone" name="contactPhone" class="form-control" maxlength="20" required value="${not empty oneIsvInfo ? oneIsvInfo.contactPhone : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label">对接人（BD）：</label>
                                                    <div class="col-sm-3">
                                                        <input type="text" id="bdContact" name="bdContact" class="form-control" maxlength="20" value="${not empty oneIsvInfo ? oneIsvInfo.bdContact : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                    <label class="col-sm-2 control-label">编码：</label>
                                                    <div class="col-sm-3">
                                                        <input type="text" id="code" name="code" class="form-control" maxlength="64" value="${not empty oneIsvInfo ? oneIsvInfo.code : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">服务商logo：</label>
                                                    <div class="col-sm-8">
                                                        <div  class="col-sm-2">
                                                            <div class="gallerys">
                                                                <img style="float: left" id="logoImg"
                                                                     class="img-rounded img-header gallery-pic"
                                                                     onclick='$.openPhotoGallery(this)'
                                                                     src="${not empty oneIsvInfo.isvIcon && not empty oneIsvInfo.isvIcon?oneIsvInfo.isvIcon:ctx}${not empty oneIsvInfo&&not empty oneIsvInfo.isvIcon ?'':'/images/main/default.jpg'}">
                                                            </div>
                                                        </div>
                                                        <div class="col-sm-10" style="text-align: left;">
                                                            <label class="ui-upload">浏览
                                                                <input type="file" id="imgChoose" name="imgChoose" style="left:-9999px;position:absolute;" onchange="onPreviewImg(this, 'logoImg')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
                                                            </label>
                                                            <label style="float: left;width: 100%;margin-left: 20px;">图片尺寸要求：64*64px，40k以内</label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </c:otherwise>
                                        </c:choose>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <div class="form-group" id="_btnDiv">
                    <div class="col-sm-4 col-sm-offset-5">
                        <c:if test="${type!='info'}">
                            <input type="button" class="btn btn-primary" onclick="doCheckImage()" value="保存">
                        </c:if>
                        <input type="button" class="btn btn-white" onclick="doCheckDataChange()" value="返回">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctx}/js/isv/win/editIsvMgr.js?t=${now}"></script>
</body>
</html>
